﻿using System;
using System.IO.IsolatedStorage;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace AR.CientFramework
{
    public static class StockageIsole
    {
        private static IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;

        #region Duree Entretien Storage
        public static void AjouterDurreeEntretienCandidat(int idCandidat, int timer)
        {
            appSettings.Add("DurreeEntretien" + idCandidat, timer);
        }
        public static void ModifierDurreeEntretienCandidat(int idCandidat, int timer)
        {
            appSettings["DurreeEntretien" + idCandidat] = timer;
        }
        public static int RetournerDurreeEntretienCandidat(int idCandidat)
        {
            if (appSettings.Contains("DurreeEntretien" + idCandidat))
                return (int)appSettings["DurreeEntretien" + idCandidat];
            else
                return -1;
        }
        public static void SupprimerDurreeEntretienCandidat(int idCandidat)
        {
            appSettings.Remove("DurreeEntretien" + idCandidat);
        }
        
        #endregion



    }
}
